<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class SensapilityAuthentication</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class SensapilityAuthentication</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">version:</span> 0.1</li>
				<li><span class="field">author:</span> api.jmatt@gmail.com</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_sensapilityauthentication.php.html">/sensapilityauthentication.php</a> (line <span class="field">26</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$debugArray" title="details" class="var-name">$debugArray</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$debugMode" title="details" class="var-name">$debugMode</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$developerEmail" title="details" class="var-name">$developerEmail</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$developerPassword" title="details" class="var-name">$developerPassword</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$pubIds" title="details" class="var-name">$pubIds</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																				
												<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#SensapilityAuthentication" title="details" class="method-name">SensapilityAuthentication</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$password</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$ids</span> = <span class="var-default">array()</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getPubIds" title="details" class="method-name">getPubIds</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#setClientHeaders" title="details" class="method-name">setClientHeaders</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#setDebugAssociation" title="details" class="method-name">setDebugAssociation</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$newAssc</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setHeaders</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#setDebugMode" title="details" class="method-name">setDebugMode</a>
											(<span class="var-type">bool</span>&nbsp;<span class="var-name">$newMode</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setHeaders</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setDeveloperEmail" title="details" class="method-name">setDeveloperEmail</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$newEmail</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setClientHeaders</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setDevelopPassword" title="details" class="method-name">setDevelopPassword</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$newPass</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setClientHeaders</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setPubIds" title="details" class="method-name">setPubIds</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$newIds</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setClientHeaders</span> = <span class="var-default">true</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$resetHeaders</span> = <span class="var-default">true</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$lookupMissingIds</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#__lookupIds" title="details" class="method-name">__lookupIds</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#__setHeadersOnGeneralServices" title="details" class="method-name">__setHeadersOnGeneralServices</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$header</span> = <span class="var-default">null</span>])
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$debugArray" id="$debugArray"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$debugArray</span>
			 = <span class="var-default">array('ns1:debug_zip' =&gt; 12345,<br />                          'ns1:debug_phone' =&gt; 67890,<br />                          'ns1:debug_association_type' =&gt; 'Active')</span>			(line <span class="line-number">32</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</div>
<a name="var$debugMode" id="$debugMode"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$debugMode</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">31</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</div>
<a name="var$developerEmail" id="$developerEmail"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$developerEmail</span>
						(line <span class="line-number">28</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</div>
<a name="var$developerPassword" id="$developerPassword"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$developerPassword</span>
						(line <span class="line-number">29</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</div>
<a name="var$pubIds" id="$pubIds"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$pubIds</span>
						(line <span class="line-number">30</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodSensapilityAuthentication" id="SensapilityAuthentication"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor SensapilityAuthentication</span> (line <span class="line-number">46</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor that initializes authentication object. If at least one pub  id is set, it will call setPubIds to attempt to fully populate the pub  id array. Also calls setClientHeaders() to set as many service headers  as ids are available for.</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			SensapilityAuthentication
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$password</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$ids</span> = <span class="var-default">array()</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$email</span><span class="var-description">: The developer email address</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$password</span><span class="var-description">: The developer password</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$id</span><span class="var-description">: Associative array mapping service names (ContentAds,  SearchAds, ReferralAds) to publisher ids</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$ids</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetPubIds" id="getPubIds"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getPubIds</span> (line <span class="line-number">385</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> Associate array mapping from service types to the pub id.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getPubIds
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetClientHeaders" id="setClientHeaders"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setClientHeaders</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the client headers for as many pub ids as we have. Access the  $SENSAPILITY_CLIENTS global variable to set headers.</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			setClientHeaders
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetDebugAssociation" id="setDebugAssociation"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setDebugAssociation</span> (line <span class="line-number">398</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Used to set the debug_association_status header for use in the sandbox</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			setDebugAssociation
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$newAssc</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setHeaders</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$newAssc</span><span class="var-description">: The association value to use</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$setHeaders</span><span class="var-description">: Whether or not the clients' headers should  be updated. Defaults to true, if resetting multiple header values,  performance will be better if client headers are only reset when the last  header value you are updated is updated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetDebugMode" id="setDebugMode"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setDebugMode</span> (line <span class="line-number">415</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Toggles whether debug headers are used. This is useful for building and  testing applications in the sandbox.</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			setDebugMode
		</span>
					(<span class="var-type">bool</span>&nbsp;<span class="var-name">$newMode</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setHeaders</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$newMode</span><span class="var-description">: Whether or not debug headers are used.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$setHeaders</span><span class="var-description">: Whether or not the clients' headers should  be updated. Defaults to true, if resetting multiple header values,  performance will be better if client headers are only reset when the last  header value you are updated is updated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetDeveloperEmail" id="setDeveloperEmail"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setDeveloperEmail</span> (line <span class="line-number">293</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the developer email address</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setDeveloperEmail
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$newEmail</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setClientHeaders</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$newEmail</span><span class="var-description">: The email address to set the developer email to.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$setClientHeaders</span><span class="var-description">: Whether or not the clients' headers should  be updated. Defaults to true, if resetting multiple header values,  performance will be better if client headers are only reset when the last  header value you are updated is updated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetDevelopPassword" id="setDevelopPassword"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setDevelopPassword</span> (line <span class="line-number">309</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the developer email address</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setDevelopPassword
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$newPass</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setClientHeaders</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$newPass</span><span class="var-description">: The password to set the developer password to.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$setClientHeaders</span><span class="var-description">: Whether or not the clients' headers should  be updated. Defaults to true, if resetting multiple header values,  performance will be better if client headers are only reset when the last  header value you are updated is updated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetPubIds" id="setPubIds"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setPubIds</span> (line <span class="line-number">336</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the publisher ids that are set in the request headers.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setPubIds
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$newIds</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$setClientHeaders</span> = <span class="var-default">true</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$resetHeaders</span> = <span class="var-default">true</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$lookupMissingIds</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$newIds</span><span class="var-description">: the new pub ids to use</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$setClientHeaders</span><span class="var-description">: Whether or not the clients' headers should  be updated. Defaults to true, if resetting multiple header values,  performance will be better if client headers are only reset when the last  header value you are updated is updated.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$resetHeaders</span><span class="var-description">: controls whether all the old headers are removed  . Setting this to false would allow the pub ids array to be set across  multiple method calls. For example, by call this method once with the  ContentAds pub id, then calling it again with the SearchAds id.  Most of  the time users will call this function to switch authentication contexts  and so the old set of pub ids should be erased by setting this value to  true.</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$lookupMissingIds</span><span class="var-description">: whether to to attempt to populate any  any missing client ids. Set to false if populating the array over  multiple calls where you want to avoid lookup overhead or if you  don't care about missing values</span>			</li>
				</ul>
		
			
	</div>
<a name="method__lookupIds" id="__lookupIds"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__lookupIds</span> (line <span class="line-number">81</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If we have developer email, developer password, and at least one pub id,</p>
<p class="description"><p>this method looks up any missing ids in the publisher array. Accesses the  pubIds array. Accesses $SENSAPILITY_CLIENTS global to use the account  service. This method will print errors if any of the required data  elements are missing from this instance</p></p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			__lookupIds
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method__setHeadersOnGeneralServices" id="__setHeadersOnGeneralServices"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__setHeadersOnGeneralServices</span> (line <span class="line-number">428</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set headers on the services that will accept the id from any  syndication service.</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			__setHeadersOnGeneralServices
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$header</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$header</span><span class="var-description">: The XML snippet that is the header for the service</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 25 May 2007 13:35:28 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.1</a>
	</p>
	</div></body>
</html>